<div
        >
    <el-row :gutter="20">
        <el-col :span="5"><el-button type="primary"
                                     v-if="needAdminRole"
                                  @click="dialogFormVisible=true" >新建商户号 </el-button></el-col>
        <el-col :span="15">
           
            商户号名称：
                <el-input style="width: 250px" v-model="pageInfo.srch_LIKE_pidName" placeholder="昵称"></el-input>
                <el-button type="primary" @click="onSubmit">搜索 </el-button>
        </el-col>
    </el-row>
    <el-row>
        <el-table
                :data="tableData"
                stripe
                border
                style="width: 100%;margin-top: 10px">
            <el-table-column
                    prop="pid"
                    label="商户号ID">
            </el-table-column>
            <el-table-column
                    prop="pidName"
                    label="商户号名称">
            </el-table-column>

            <el-table-column
                    prop="createdBy.name"
                    label="归属人">
            </el-table-column>
            <el-table-column
                    prop="createdAt"
                    label="创建时间">
            </el-table-column>
            <el-table-column
            prop="updatedBy.name"
            label="更新人">
    </el-table-column>
    <el-table-column
            prop="updatedAt"
            label="更新时间">
    </el-table-column>
            <el-table-column
                    label="操作"
                    width="250">
                <template slot-scope="scope">
                    <!-- <el-button @click="openDetails(scope.row)" type="text" size="small">查看详情</el-button> -->
                    <el-button
                            v-if="needAdminRole  && !scope.row.delete "
                          
                             type="text" size="small" @click="editForm= Object.assign({},scope.row);showEditWin=true">编辑信息</el-button>
                    <el-button v-if="needAdminRole && !scope.row.delete "
                            type="text" size="small" @click="deletePid(scope.row)">停用</el-button>
                            <el-button v-if="needAdminRole && scope.row.delete "
                            type="text" size="small" @click="startPid(scope.row.id)">启用</el-button>
                </template>
            </el-table-column>
        </el-table>
    </el-row>
    <div class="marginT10 center">
            <el-pagination
                    background
                    layout="prev, pager, next"
                    @current-change="handleCurrentChange"
                    :page-size="pageInfo.pageSize"
                    :total="pageInfo.totalNum"
                    :current-page="pageInfo.currentPage">
            </el-pagination>
    </div>
    <el-dialog title="新建商户号" :visible.sync="dialogFormVisible"  width="30%">
        <el-form :model="form">
            <el-form-item label="商户号ID：" :label-width="formLabelWidth">
                <el-input v-model="form.pId" autocomplete="off"></el-input>
            </el-form-item>
            <el-form-item label="商户号名称：" :label-width="formLabelWidth">
                <el-input v-model="form.pName" autocomplete="off"></el-input>
            </el-form-item>
        </el-form>
        <div slot="footer" class="dialog-footer">
            <el-button @click="dialogFormVisible = false">取 消</el-button>
            <el-button type="primary"  @click="dialogFormVisible = false;save()">确 定</el-button>
        </div>
    </el-dialog>

    <el-dialog title="编辑" :visible.sync="showEditWin"  width="30%">
        <el-form :model="editForm">
            <el-form-item label="商户号ID：" :label-width="formLabelWidth">
                <el-input  v-model="editForm.pid" autocomplete="off"></el-input>
            </el-form-item>
            <el-form-item label="商户号名称：" :label-width="formLabelWidth">
                <el-input v-model="editForm.pidName" autocomplete="off"></el-input>
            </el-form-item>
        </el-form>
        <div slot="footer" class="dialog-footer">
            <el-button @click="editForm={};showEditWin=false;">取 消</el-button>
            <el-button type="primary"@click="edit">确 定</el-button>
        </div>
    </el-dialog>
</div>